#ifndef PROPSELECTOR_H
#define PROPSELECTOR_H

#include <vector>
#include <QMenu>

#include "treeview.h"

class ToggledReceiver
{
public:
    ToggledReceiver(TreeView *view, TIP prop);

    void receive(bool checked);

private:
    TreeView *m_view;
    TIP m_prop;
};

class PropSelector : public QMenu
{
    Q_OBJECT
public:
    PropSelector(TreeView *view, QWidget *parent = 0);

private slots:
    void _after_prop_shown_toggled(TIP prop, bool shown);

private:
    TreeView * m_view;
    std::vector<QAction *> m_actions;
};

#endif // PROPSELECTOR_H
